<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>springmvc</title>
    <%--给表添加样式--%>
    <style>
        .tt{
            border-collapse: collapse;
            width: 80%;
            margin: 0 auto;
        }
        .tt tr th,.tt tr td{
            padding: 8px;
            margin: 5px;
            text-align: center;
           border:1px solid #eaeaea;
        }
        .tt tr:nth-child(odd){
            background-color: #f6f6f6;
        }
    </style>


</head>
<body>
   <h3>欢迎：${name}</h3>
   <table class="tt">
       <tr>
           <th>编号</th>
           <th>姓名</th>
           <th>年龄</th>
           <th>基本操作</th>
       </tr>
       <c:forEach items="${list}" var="i" >
           <tr>
               <td>${i.id}</td>
               <td>${i.name}</td>
               <td>${i.age}</td>
               <td><a href="del.do?id=${i.id}">删除</a></td>

           </tr>


       </c:forEach>
   </table>


</body>
</html>